package com.stormragetech.init.sign;

import java.io.Serializable;

public class InitParams implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 5257938290042323554L;

	// ------------------------------- Fields -------------------------------

	private Integer order; // 0-顺序，1-逆序

	private String salt;

	private String[] encode;

	private String[] properties;

	// ------------------------------- Fields -------------------------------

	public InitParams() {

	}

	public InitParams(Integer order, String salt, String[] encode, String[] properties) {
		this.order = order;
		this.salt = salt;
		this.encode = encode;
		this.properties = properties;
	}

	// ------------------------------- Fields -------------------------------

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public String[] getEncode() {
		return encode;
	}

	public void setEncode(String[] encode) {
		this.encode = encode;
	}

	public String[] getProperties() {
		return properties;
	}

	public void setProperties(String[] properties) {
		this.properties = properties;
	}

	// ------------------------------- Fields -------------------------------

	public boolean isEmpty() {

		if (null == this.order || this.order != 0 || this.order != 1) {
			return true;
		}
		if (null == encode || encode.length <= 0) {
			return true;
		}
		if (null == properties || properties.length <= 0) {
			return true;
		}

		return false;

	}

	public String toString() {
		return this.getClass() + " : order - " + order + " salt - " + salt + " encode - " + encode + " properties - "
				+ properties;
	}

}
